package cn.zxcoder.entity.goods;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import sun.awt.SunHints;

/**
 * <p>
 * 商品信息
 * </p>
 *
 * @author zx
 * @since 2023-04-28
 */
@ApiModel(value = "Product对象", description = "商品信息")
@Data
@Setter
@Getter
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String goodsName;

    private String goodsPrice;

    @ApiModelProperty("修改时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date editTime;

    @ApiModelProperty("修改人")
    private String editUser;

    @ApiModelProperty("默认图片")
    private String url;

    @ApiModelProperty("图片列表字符串")
    private String srcLists;

    @TableField(exist = false)
    @ApiModelProperty("图片列表")
    private List<String> srcList;

    public Product(Integer id, String goodsName, String goodsPrice, Date editTime, String editUser) {
        this.id = id;
        this.goodsName = goodsName;
        this.goodsPrice = goodsPrice;
        this.editTime = editTime;
        this.editUser = editUser;
    }

    public Product(String goodsName, String goodsPrice, Date editTime, String editUser) {
        this.goodsName = goodsName;
        this.goodsPrice = goodsPrice;
        this.editTime = editTime;
        this.editUser = editUser;
    }

    public Product() {
    }


    @Override
    public String toString() {
        return "Product{" +
                "id=" + id +
                ", goodsName=" + goodsName +
                ", goodsPrice=" + goodsPrice +
                ", editTime=" + editTime +
                ", editUser=" + editUser +
                "}";
    }
}
